<?php
/**
 * Yii view index
 *
 * @author <KTD SOFT>
 * @since Jan 13, 2013 - 10:00:28 AM
 */
$createUrl = $this->createUrl(Yii::app()->controller->id . "/create", array(
    'lang' => Yii::app()->language,
    'type' => $type,
        ));
?>
<div class="grid">
    <div class="grid-title">
        <div class="pull-left"><?php echo Yii::t('auth', $authName) ?></div>
        <div class="pull-right">
            <a href="<?php echo $createUrl ?>" class="btn btn-primary">
                <i class="icon icon-plus"></i> <?php echo Yii::t('auth', 'Create') ?>
            </a>
        </div>
        <div class="clear"></div>
    </div>
    <table class="table table-striped table-mod-2">
        <thead>
            <tr>
                <th><?php echo Yii::t('auth', $authName) ?></th>
                <th><?php echo Yii::t('auth', 'Description') ?></th>
                <th><?php echo Yii::t('auth', 'Actions') ?></th>
            </tr>
        </thead>
        <tbody>
            <?php
            foreach ($authItems as $item):
                ?>            
                <tr>
                    <td><?php echo $item->name ?></td>
                    <td><?php echo $item->description ?></td>
                    <td>
                        <a href="<?php echo $this->urlAction('update', $item->name, $item->type) ?>" 
                           class="btn btn-mini">
                               <?php echo Yii::t('auth', 'Update') ?>
                        </a>
                        <a href="<?php echo $this->urlAction('delete', $item->name, $item->type) ?>" 
                           class="btn btn-inverse btn-mini">
                            <?php echo Yii::t('auth', 'Delete') ?>
                        </a>
                    </td>
                </tr>
            <?php endforeach; ?>                
        </tbody>
    </table>
</div>



